home *** CD-ROM | disk | FTP | other *** search
/ HPAVC / HPAVC CD-ROM.iso / pc / SNNSV32.ZIP / SNNSv3.2 / kernel / sources / ext_typ.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-04-25  |  4.4 KB  |  155 lines

  1. /*****************************************************************************
  2.   FILE           : ext_typ.h
  3.   SHORTNAME      : 
  4.   SNNS VERSION   : 3.2
  5.  
  6.   PURPOSE        : SNNS MasPar Kernel: Datatypes and Constants for Internal Usage
  7.   NOTES          :
  8.  
  9.   AUTHOR         : Niels Mache 
  10.   DATE           : 01.01.92
  11.  
  12.   CHANGED BY     : Sven Doering
  13.   IDENTIFICATION : @(#)ext_typ.h    1.9 4/12/94
  14.   SCCS VERSION   : 1.9
  15.   LAST CHANGE    : 4/12/94
  16.  
  17.              Copyright (c) 1990-1994  SNNS Group, IPVR, Univ. Stuttgart, FRG
  18.  
  19. ******************************************************************************/
  20. #ifndef  KR_EXTERNAL_TYPES
  21. #define  KR_EXTERNAL_TYPES
  22.  
  23.  
  24. typedef  void    (* FunctionPtr) (void *,...);
  25. typedef  krui_err  (* NetFunctionPtr) (void *,...);
  26.  
  27.  
  28. struct  UnitValues  {
  29.   unsigned short  selector;
  30.   int  lun, lln;
  31.   FlintType  out, act, i_act, bias;
  32. };
  33.  
  34. struct UnitDescriptor  {
  35.   int  srcUnitLLN,
  36.        destUnitLLN,
  37.        srcUnitLUN,
  38.        destUnitLUN;
  39. };
  40.  
  41.  
  42. struct NetFuncParameters  {
  43.   int  start_pattern_no,
  44.        end_pattern_no,
  45.        cycles,
  46.        
  47.        no_of_input_parameters,
  48.        no_of_output_parameters;
  49.  
  50.   float  input_parameters[NO_OF_LEARN_PARAMS],
  51.          output_parameters[NO_OF_LEARN_PARAMS];
  52.  
  53.   FunctionPtr  function;              /*  pointer to the function  */
  54. };
  55.  
  56.  
  57.  
  58.  
  59.  
  60. /*#################################################
  61.  
  62. GROUP: Type Definition of Function Table
  63.  
  64. #################################################*/
  65.  
  66. /*  Function table structure
  67. */
  68. struct  FuncTable  {
  69.   char    *func_name;                 /*  name of the function  */
  70.   unsigned short  func_type,          /*  type of the function  */
  71.            no_of_input_parameters,    /*  no. of input parameters used by this function  */
  72.                                       /*  (only for Update, Init and Learning functions)  */
  73.            no_of_output_parameters;   /*  no. of ouput parameters returned by this function  */
  74.                                       /*  (only for Update and Learning functions)  */
  75.   FunctionPtr  function;              /*  pointer to the function  */
  76. };
  77.  
  78.  
  79.  
  80. #define  FUNCTION_NAME_MAX_LEN   100
  81.  
  82. struct FuncInfoDescriptor  {
  83.   int      number;
  84.   char     func_name[FUNCTION_NAME_MAX_LEN];   /*  name of the function  */
  85.   unsigned short    
  86.            func_type,                 /*  type of the function  */
  87.            no_of_input_parameters,    /*  no. of input parameters used by this function  */
  88.                                       /*  (only for Update, Init and Learning functions)  */
  89.            no_of_output_parameters;   /*  no. of ouput parameters returned by this function  */
  90.                                       /*  (only for Update and Learning functions)  */
  91.   FunctionPtr  function;              /*  pointer to the function  */
  92. };
  93.  
  94.  
  95. /*#################################################
  96.  
  97. GROUP: Feedforward network descriptor
  98.  
  99. #################################################*/
  100.  
  101. #ifdef MASPAR_KERNEL
  102.  
  103. /* max. number of layers of a feedforward network in superscalar kernel mode  */
  104. #define  FF_MAX_LAYERS  8
  105.  
  106. struct  FFnetDescriptor  {
  107.   int  no_of_layers;   /*  no. of layers of the network */
  108.   int  no_of_weights;    /*  no. of weights in network  */
  109.  
  110.   struct
  111.     {  /*  describes the layers of the network
  112.            (layers[i] describes the units in layer i, layer 0 is the input layer)  */
  113.     int  no_of_units;          /*  no. of units in this layer  */
  114.  
  115.     struct
  116.       {  /*  inputs[k] describes the input connections of the units in
  117.              the layer i to units in layer k  */
  118.       int  no_of_inputs;         /*  stores the total no. of connections
  119.                                      from units in layer k with units in layer i.
  120.                                  */
  121.       FlintType  *weight_array;  /*  pointer to the weight array containing the
  122.                                      connection weights of connections from
  123.                                      layer i to layer k.
  124.                                  */
  125.  
  126.       /*  if the network has partial connected units:  */
  127.       /*  first input connection of unit i to unit <first_connection>
  128.           in layer k
  129.       */
  130.       /*  gap count of the input connections of units in layer i with
  131.           units in layer k
  132.       */
  133.     }  inputs[FF_MAX_LAYERS - 1];
  134.  
  135.   }  layers[FF_MAX_LAYERS];
  136. };
  137.  
  138.  
  139. struct  MasParInfo  {
  140.   int  no_of_PEs,
  141.        memory_perPE,
  142.        no_of_network_copies,
  143.        no_of_used_PEs;
  144.  
  145.   float  efficiency;
  146. };
  147.  
  148. #endif
  149.  
  150. #endif
  151.  
  152.  
  153.  
  154.  
  155.